package com.yc.factorymethod2;

import com.yc.bean.ICourse;

public class FactoryMethodTest {
    public static void main(String[] args) {


        ICourseFactory factory = new JavaCourseFactory();
        ICourse course = factory.create();
        course.record();

        factory = new PythonCourseFactory();
        course = factory.create();
        course.record();


        factory = new CCourseFactory();
        course = factory.create();
        course.record();


    }
}
